<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../lib/OSL/layui/css/layui.css">
    <link rel="stylesheet" href="../lib/css/page/lab_appointment_manage.css">
</head>

<body>
    <div class="layui-card">
        <div class="layui-card-header">
            <span>退换宿申请信息</span>
            <!-- <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="addLab">新增申请</button> -->
        </div>
        <!-- 卡片区域  -->
        <div class="layui-card-body">
            <!-- 搜索区域   -->
            <form class="layui-form" id="form_search">
                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label">申请标题</label>
                    <div class="layui-input-block">
                        <input type="text" name="title" placeholder="请输入意见标题" autocomplete="off"
                            class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label">申请时间</label>
                    <div class="layui-input-block">
                        <input type="text" name="submit_time" placeholder="请输入意见时间" autocomplete="off"
                            class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-inline">
                    <label class=" layui-form-label">处理状态</label>
                    <div class="layui-input-block">
                        <select class="select" name="status">
                            <option></option>
                            <option value="1">未处理</option>
                            <option value="0">已处理</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-inline">
                    <div style="margin-left: 10px;">
                        <button class="layui-btn btn_search" lay-submit lay-filter="formDemo">搜索</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
            <!-- //数据区 -->
            <table class="layui-table">
                <colgroup>
                    <col />
                    <col />
                    <col width="100px"/>
                    <col width="100px"/>
                    <col width="200px"/>
                    <col />
                    <col width="100px"/>
                </colgroup>
                <thead>
                    <tr>    
                        <th>姓名</th>
                        <th>学号</th>
                        <th>申请标题</th>
                        <th>申请原因</th>
                        <th>申请时间</th>
                        <th>宿管回复</th>
                        <th>处理状态</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>

                </tbody>
            </table>
            <!-- //分页区域 -->
            <div id="pageBox"></div>
        </div>
    </div>
    <!-- ---------------------------------------------------------------- -->

    <!-- ---------------------------------------------------------------- -->
    <script src="../lib/OSL/jquery.js"></script>
    <script src="../lib/OSL/layui/layui.all.js"></script>
    <script src="../lib/js/baseAPI.js"></script>
    <script src="../lib/js/page/suggestions_ch.js"></script>
    <script src="../lib/OSL/template-web.js"></script>

     <!-- 获取所有用户数据的表格模板 -->
     <script type="text/html" id="tpl-table">
        {{each data}}
        {{if $value.status_type === 3}}
        <tr >
            <td>{{$value.sno_name}}</td>
            <td>{{$value.sno}}</td>
            <td>{{$value.title}}</td>
            <td>{{$value.content}}</td>
            <td>{{$value.submit_time}}</td>
            <td>{{$value.reply}}</td>
            {{if $value.status ==1}}
            <td>
                <button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn_fixUser" disabled="true"
                style="cursor:default;background-color: #d9282e;">未处理</button>
            </td>
            {{/if}}  
            {{if $value.status ==0}}  
            <td>
                <button type="button" class="layui-btn layui-btn-danger layui-btn-sm" disabled="true"
                style="cursor:default;background-color: #2ce6e6;">已处理</button>
            </td>
            {{/if}}  
            <td>
                <button type="button" class="layui-btn layui-btn-sm btn_editLabCh" data_id="{{$value.id}}">回复</button>
            </td>
        </tr>
        {{/if}}
        {{/each}}
    </script>

   <!-- 根据id修改信息 -->
   <script type="text/html" id="dialog_editLabCh">
    <form class="layui-form" id="form_editLabCh" lay-filter="form_editCh">
        <input type="hidden" name="id">
        <div class="layui-form-item">
            <label class="layui-form-label">申请标题</label>
            <div class="layui-input-block">
                <input type="text" name="title" lay-verify="required" placeholder="请输入申请标题"
                    autocomplete="off" class="layui-input"  disabled="true" > 
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">回复内容</label>
            <div class="layui-input-block">
                <textarea type="text" name="reply" lay-verify="required" placeholder="请输入回复内容"
                    autocomplete="off" class="layui-textarea"> </textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">确认回复</button>
            </div>
        </div>
    </form>
</script>
</body>

</html>